/*
 * @(#)PertFactory.java
 *
 * Copyright (c) 1996-2010 by the original authors of JHotDraw and all its
 * contributors. All rights reserved.
 *
 * You may not use, copy or modify this file, except in compliance with the 
 * license agreement you entered into with the copyright holders. For details
 * see accompanying license terms.
 */

package stateDiagram;
import stateDiagram.EntityObjects.Event;
import stateDiagram.figures.ActionTextFigure;
import stateDiagram.figures.EndStateFigure;
import stateDiagram.figures.EntryActionTextFigure;
import stateDiagram.figures.EventTextFigure;
import stateDiagram.figures.ExitActionTextFigure;
import stateDiagram.figures.StartStateFigure;
import stateDiagram.figures.StateNameTextFigure;
import stateDiagram.figures.SubStateFigure;
import stateDiagram.figures.SuperStateFigure;
import stateDiagram.figures.TransitionActionTextFigure;
import stateDiagram.figures.TransitionEventTextFigure;
import stateDiagram.figures.TransitionFigure;
import stateDiagram.figures.SeperatorFigure;
import stateDiagram.figures.StateFigure;

import org.jhotdraw.draw.liner.ElbowLiner;
import org.jhotdraw.draw.locator.RelativeLocator;
import org.jhotdraw.draw.connector.LocatorConnector;
import org.jhotdraw.draw.connector.ChopRectangleConnector;
import org.jhotdraw.draw.decoration.ArrowTip;
import org.jhotdraw.draw.*;
import org.jhotdraw.geom.Insets2D;
import org.jhotdraw.xml.*;
/**
 * PertFactory.
 * 
 * @author Werner Randelshofer
 * @version $Id: PertFactory.java 717 2010-11-21 12:30:57Z rawcoder $
 */
public class StateDiagramFactory extends DefaultDOMFactory {
    private final static Object[][] classTagArray = {
        { DefaultDrawing.class, "StateDiagram" },
        { StateFigure.class, "State" },
        { TransitionFigure.class, "tran" },
        { ListFigure.class, "list" },
        { TextFigure.class, "text" },
        { GroupFigure.class, "g" },
        { TextAreaFigure.class, "ta" },
        { SeperatorFigure.class, "separator" },
        { EndStateFigure.class, "endstate"},
        {Event.class, "Event"},
        { StartStateFigure.class, "StartState"},
        { EntryActionTextFigure.class, "entryAction"},
        {ExitActionTextFigure.class, "exitAction"},
        {EventTextFigure.class, "eventText"},
        {ActionTextFigure.class, "actionText"},
        {StateNameTextFigure.class, "StateName"},
        {TransitionActionTextFigure.class, "transAction"},
        {TransitionEventTextFigure.class, "transEvent"},
        {EllipseFigure.class, "Ellipse"},
        {SuperStateFigure.class, "super"},
        {SubStateFigure.class, "sub"},
        {ElbowLiner.class, "elbow"},
        { ChopRectangleConnector.class, "rectConnector" },
        { LocatorConnector.class, "locConnector" },
        { RelativeLocator.class, "relativeLocator" },
        { ArrowTip.class, "arrowTip" }
    };
    
    /** Creates a new instance. */
    public StateDiagramFactory() {
        for (Object[] o : classTagArray) {
            addStorableClass((String) o[1], (Class) o[0]);
        }
    }
}
